<div class="sessions clearfix ">
  <div class="pull-right" style="position: relative;">
    <div class="sessions-main ">
      <h2 >WELCOME!
        <p>欢迎登录后台</p>
        <p>后台管理系统</p>
      </h2>

      <%= simple_form_for AdminUser.new, url: backend_session_path, method: :post, html: {class: 'uk-panel uk-panel-box uk-form sessions-form'} do |f| %>
          <div class="uk-form-row uk-form-list">
            <!--<p class="ay_align_l ay_font_12 index-color-7">登录账号</p>-->
            <input type="text" name="admin_user[login]" placeholder="账号" class="uk-width-1-1 uk-form-large">
          </div>
          <div class="uk-form-row uk-form-list">
            <!--<p class="ay_align_l ay_font_12 index-color-7">输入密码</p>-->
            <input type="password" name="admin_user[password]" placeholder="密码" class="uk-width-1-1 uk-form-large">
          </div>
          <div class="uk-form-row uk-form-list">
            <!--<p class="ay_align_l ay_font_12 index-color-7">输入验证码</p>-->
            <div class="uk-grid">
              <div class="uk-width-7-10">
                <%= rucaptcha_input_tag(class: 'input-captcha uk-width-1-1 uk-form-large', placeholder: '请输入验证码') %>
              </div>
              <div class="uk-width-3-10">
                <%= rucaptcha_image_tag(alt: 'Captcha', class: 'img-captcha uk-width-1-1', style: 'height:40px', onclick: "refreshCaptcha()") %>
              </div>
            </div>
          </div>
          <div class="uk-form-row">
            <button class="uk-width-1-1 uk-button uk-button-theme uk-button-large uk-button-theme-width" >登 入</button>
          </div>
      <% end %>
    </div>
  </div>

</div>
<%= content_for :page_assets do %>

    <script>
        function refreshCaptcha() {
            $('.img-captcha').attr('src', '/rucaptcha');
        }
    </script>
<% end %>
